
    import {
        DIC
    } from '@/const/dic';
    import {
        timeFormatter
    } from '../formatter';
    import Store from '../../store/';
    const allPermission = Store.state.user.permission;
    const isAdmin = Store.state.user.userInfo.superAdmin;
    export const categoryTableOption = {
        border: true,
        index: true,
        selection: true,
        calcHeight: 350,
        columnBtn:false,
        searchClearable: false,
        selectClearBtn: false,
        searchResetBtn: false,
        height:"auto",
        menu: true,
        menuAlign: "center",
        searchBtn: true,
        labelWidth: 120,
        refreshBtn: true,
        tip:false,
        addBtn: true,
        dialogWidth: '800px',
        dialogHeight: 'auto',
        menuWidth: 180,
        editBtn: isAdmin || !!allPermission['/category/edit'],
        viewBtn: false,
        delBtn: isAdmin || !!allPermission['/category/remove'],
        column: [
    {
        "label": "名称",
        "prop": "title",
        "search": true,
        "type": "text",
        "fixed": false,
        "width": "auto",
        "row": true,
        "minWidth": "120",
        "readonly": false,
        "span": 24,
        "display": true,
        "hide": false,
        "rules": [
            {
                "required": true,
                "message": "请输入名称",
                "trigger": "blur"
            }
        ]
    },
    {
        "label": "封面",
        "prop": "cover",
        "search": false,
        "type": "upload",
        "fixed": false,
        "width": "auto",
        "row": true,
        "minWidth": "120",
        "readonly": false,
        "span": 12,
        "display": true,
        "hide": false,
        "listType": "picture-img",
        "showFileList": false,
        "imgHeight": 60,
        "imgWidth": "auto",
        "action": "/upload/image",
        "tip": "只能上传jpg/png文件，且不超过500kb",
        "rules": [
            {
                "required": true,
                "message": "请输入封面",
                "trigger": "blur"
            }
        ]
    },
    {
        "label": "父分类123",
        "prop": "parent_id",
        "search": false,
        "type": "select",
        "fixed": false,
        "width": "auto",
        "row": false,
        "minWidth": "120",
        "readonly": false,
        "span": 12,
        "display": true,
        "hide": false,
        "rules": [
            {
                "required": true,
                "message": "请选择父分类",
                "trigger": "blur"
            }
        ]
    },
    {
        "label": "创建时间",
        "prop": "create_time",
        "search": false,
        "type": "datetime",
        "fixed": false,
        "width": "160",
        "row": false,
        "minWidth": "120",
        "readonly": false,
        "span": 12,
        "display": false,
        "hide": false
    },
    {
        "label": "修改时间",
        "prop": "modify_time",
        "search": false,
        "type": "datetime",
        "fixed": false,
        "width": "160",
        "row": false,
        "minWidth": "120",
        "readonly": false,
        "span": 12,
        "display": false,
        "hide": false
    },
    {
        "label": "排序",
        "prop": "sort",
        "search": false,
        "type": "number",
        "fixed": false,
        "width": "auto",
        "row": false,
        "minWidth": "120",
        "readonly": false,
        "span": 12,
        "display": true,
        "hide": false,
        "rules": [
            {
                "required": true,
                "message": "请输入排序",
                "trigger": "blur"
            }
        ]
    },
    {
        "label": "状态",
        "prop": "status",
        "search": false,
        "type": "select",
        "fixed": false,
        "width": "auto",
        "row": false,
        "minWidth": "120",
        "readonly": false,
        "span": 12,
        "display": true,
        "hide": false,
        "rules": [
            {
                "required": true,
                "message": "请选择状态",
                "trigger": "blur"
            }
        ],
        "placeholder": "请选择状态",
        "dicData": DIC["menustatusDic"]
    }
]
    };
